package com.example.imtoken.modules.user.create.backups

import com.blankj.utilcode.util.LogUtils
import com.example.imtoken.core.App
import com.example.imtoken.core.base.BaseViewModel
import com.example.imtoken.room.base.AppDataBase
import com.example.imtoken.room.schema.WalletBackUpSchema

class BackupsViewModel : BaseViewModel() {

    fun addBackUp() {
        val backUp = WalletBackUpSchema(App.createLiveData.value?.coin?.address, false)
        if (AppDataBase.instance.getWalletBackUpDao().insertWalletBackUp(backUp) > 0) {
            LogUtils.e("添加钱包备份信息成功")
        } else {
            LogUtils.e("添加钱包备份信息失败")
        }
    }

}